<?php

//echo br(3); ###########################################################################################

	$TEMP->set_file(array('handle' => DIR_VIEW_PROFESSOR . 'subjects.html'));
	
	$faculty = $PI->getPersonalInformation($logUserID);
	$profName = $faculty['first_name'] . ' ' . $faculty['last_name'];


	$profSubjectList = $DSC->getProfSubjectList($logUserID);

	if ( (!empty($profSubjectList)) ) {
		$TEMP->set_block('handle',  'subjects', 'subjectsRow');
		$bgcolor2 	= LOOPING_F0F;
		$numCount2 	= 1;
		foreach($profSubjectList as $profSubjectListValue) {

			$TEMP->set_var(array('subject_desc'  => '<span class="font-blue">' . $profSubjectListValue['course_code'] . ' : <u>'. $profSubjectListValue['subj_desc'].'</u></span>',
						 		 'subject_code'  => $profSubjectListValue['subj_code'],
						 		 'total_units'   => (!empty($profSubjectListValue['total_units'])) ? '<strong>' . abs($profSubjectListValue['total_units']) . '</strong> Units' : '-----',
						 		 'total_hours'   => '<strong>' . $profSubjectListValue['total_hrs'] . '</strong> Hours',
						 		 'prof_subj_id'  => $profSubjectListValue['prof_subj_idPK'],
						 		 'sem_linker_id' => $profSubjectListValue['sem_linker_idFK'],
						 		 'subj_id' 		 => $profSubjectListValue['subj_idFK'],
						 		 'hash' 		 => hashRandom($profSubjectListValue['subj_desc'].$profSubjectListValue['subj_code'].$profSubjectListValue['prof_subj_idPK'].$profSubjectListValue['sem_linker_idFK'].$profSubjectListValue['subj_idFK']),
						 		 'numbering2' 	 => $numCount2));
								 
			$TEMP->parse('subjectsRow', 'subjects', true);
			$bgcolor2 = ($bgcolor2 == LOOPING_F0F) ? LOOPING_FFF : LOOPING_F0F;
			$numCount2++;
			
		}
	}
	else {
		$TEMP->set_var(array('subject_desc' => 'No Record Found',
						 	 'subject_code' => '',
						 	 'numbering2' 	=> ''));
	}
	
	$TEMP->set_var(array('prof_sub_menu'	=> $pageLib->professorSubMenu(DIR_IMAGES),
						 'course_desc'		=> $courseDesc,
						 'fid'				=> $logUserID,
						 'cid'				=> $CID,
						));
?>